package com.sunjob.loginserver.mapper;

import com.sunjob.common.domain.loginServer.SysRole;
import com.sunjob.common.domain.loginServer.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Wangzurong
 * @create 2022-07-24 19:04
 */
@Mapper
@Component
public interface SysUserMapper {
    SysUser getUserByLoginName(String loginName);
    Integer getNumByLoginName(String loginName);
    Integer insertUser(SysUser user);
    SysUser getUserByPhone(String phonenumber);
    SysUser getUserByUserName(String userName);
    SysUser getUserByEmail(String email);
    Integer updateUser(@Param("user") SysUser user);
    SysUser getUserById(Long userId);

    List<String> queryPostsByUserId(Long userId);

    Integer updateAvatar(Long loginId, Long imgId);
}
